package com.aisino.inveli.vinda.service;

import com.aisino.inveli.vinda.entity.GoodsDetail;
import com.aisino.inveli.vinda.entity.GoodsList;

import java.util.List;

/**
 * @author leifeng
 * @Date 2017-11-15
 * 商品service
 **/
public interface GoodsService {

    /**
     * 根据传入路径解析商品信息
     * @param selectPath
     * @return
     */
    GoodsList parseGoodsByFile(String selectPath);

    /**
     * 对商品进行计算
     * @param goodsList
     * @param config
     * @return
     */
    GoodsList calculateGoodsList(GoodsList goodsList);

    /**
     * 合并商品
     * @param goodsList
     * @return
     */
    GoodsList mergeGoods(GoodsList goodsList);

    /**
     * 将商品进行分类
     * @param goodsList
     * @return
     */
    GoodsList changeFourList(GoodsList goodsList);

    /**
     * 将分类商品分类
     *
     * @param rate
     * @param isSup 折扣模式--超市奖励
     * @param isMon 折扣模式--金额调整
     * @param goodsList 商品集合
     * @return
     */
    GoodsList mainChange(Double rate, Boolean isSup, Boolean isMon, GoodsList goodsList);

    /**
     * 调整正数商品
     * @param goodsList
     * @return
     */
    GoodsList adjustZsGoodsList(GoodsList goodsList);

    /**
     * 计算表格总金额 = 金额+调整金额
     * @param resultZS
     * @return
     */
    String countTotalAmount(List<GoodsDetail> resultZS);

    /**
     * 计算折扣总金额
     * @param resultZS
     * @return
     */
    String countTotalDiscount(List<GoodsDetail> resultZS);
}
